######################################################## 
## ~W: ޲zis|Uq
## ~@: ycl6 < ycl6@users.sourceforge.net > (Y.C. LIN) http://macphpbbmod.sourceforge.net/
## ~yz: w˳oӥ~, s|Uq|Hbx]w| (̦n޲z)
## ~: 1.0.2
## 
## w: ²
## wˮɶ: 5  
##
## ݭns誺ɮ: 5
##	includes/usercp_register.php
##	language/lang_chinese_traditional_taiwan/lang_main.php
##	language/lang_chinese_traditional_taiwan/lang_admin.php
##	admin/admin_board.php
##	templates/subSilver/admin/board_config_body.tpl
##
## [ɮ: 1
##	root/language/lang_chinese_traditional_taiwan/email/notify_admin_new_reg.tpl
##
## vn: http://opensource.org/licenses/gpl-license.php GNU Public License v2 
################################################################# 
## ѩwWҶq, ˬd: http://www.phpbb.com/mods/
## O_~̷s. Mb[J~ƮweA~wggLˬd
## OoäOҥ~SwWD. 
## 󤣦b~Ʈw (http://www.phpbb.com/mods/) ~
## N|b phpbb.com QתO䴩 
############################################################## 
## @̯d:
##	~b 2.0.17 WչL. iH EasyMOD 0.2.1a Ӧw˦~
## 
############################################################## 
## v: 
##
##   2005-09-27 -  1.0.0
##      - oG
##
##   2005-09-29 -  1.0.1
##      - ץF@ӻP ")" Ÿp
##
##   2005-10-01 -  1.0.2
##      - ץF@ӻPjpgD
##	- W[F add-on: "hӷ|is|Uq"
## 
############################################################## 
## bW[~e, аȥƥҦݭnק諸ɮ
##############################################################

# 
#-----[ SQL ]------------------------------------------ 
#
# Remember to change the table prefix used on your database
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ( 'notify_admin_new_reg', '1' );
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) VALUES ( 'notify_admin_new_reg_userid', '2' );

# 
#-----[ ƻs ]------------------------------------------ 
#
copy root/language/lang_chinese_traditional_taiwan/email/notify_admin_new_reg.tpl to language/lang_english/email/notify_admin_new_reg.tpl

# 
#-----[ } ]------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_main.php

# 
#-----[ M ]------------------------------------------ 
#
?>

# 
#-----[ e, [W ]------------------------------------------ 
#
// Admin Email notification on New Registration MOD
$lang['Administrator'] = 'tκ޲z';
$lang['Notify_admin_new_reg'] = 's|U!';

# 
#-----[ } ]------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_admin.php

# 
#-----[ M ]------------------------------------------ 
#
?>

# 
#-----[ e, [W ]------------------------------------------ 
#
// Admin Email notification on New Registration MOD
$lang['Enable_notify_admin_new_reg_title'] = '޲zis|Uq';
$lang['Enable_notify_admin_new_reg'] = 'ҥκ޲zq';
$lang['Enable_notify_admin_new_reg_explain'] = 's|bQתUɳqtκ޲z';
$lang['Enable_notify_admin_new_reg_userid'] = '޲z| ID';
$lang['Enable_notify_admin_new_reg_userid_explain'] = 'Jwq| (userid) ID';

# 
#-----[ } ]------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ M ]------------------------------------------ 
# Should look like:
#				//
#				// The users account has been deactivated, send them an email with a new activation key
#				//
#				include($phpbb_root_path . 'includes/emailer.'.$phpEx);
				include($phpbb_root_path . 'includes/emailer.'.$phpEx);

# 
#-----[ bӦ椺M ]------------------------------------------ 
#
include

# 
#-----[ ӦN ]------------------------------------------ 
#
include_once

# 
#-----[ M ]------------------------------------------ 
#
			if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
			{
				message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
			}

# 
#-----[ , [W ]------------------------------------------ 
#
			if ( $board_config['notify_admin_new_reg'] )
			{
				$admin_profile = array();
				$admin_profile = get_userdata($board_config['notify_admin_new_reg_userid']);

				$use_template = (empty($admin_profile)) ? $board_config['default_lang'] : $admin_profile['user_lang'];
				$email_address = (empty($admin_profile)) ? $board_config['board_email'] : $admin_profile['user_email'];
				$admin_name = (empty($admin_profile)) ? $lang['Administrator'] : $admin_profile['username'];
				
				include_once($phpbb_root_path . 'includes/emailer.'.$phpEx);
				$emailer = new emailer($board_config['smtp_delivery']);

				$emailer->from($board_config['board_email']);
				$emailer->replyto($board_config['board_email']);

				$emailer->use_template('notify_admin_new_reg', stripslashes($use_template));
				$emailer->email_address($email_address);
				$emailer->set_subject($lang['Notify_admin_new_reg']);

				$emailer->assign_vars(array(
					'ADMIN_NAME' => $admin_name,
					'SITENAME' => $board_config['sitename'],
					'USER_NAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
					'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
					'USER_PROFILE' => $server_url . '?mode=viewprofile&' . POST_USERS_URL . '=' . $user_id)
				);
				$emailer->send();
				$emailer->reset();
			}

# 
#-----[ M ]------------------------------------------ 
# Should look like:
#				$email_template = 'user_welcome';
#			}
#
#			include($phpbb_root_path . 'includes/emailer.'.$phpEx);
			include($phpbb_root_path . 'includes/emailer.'.$phpEx);

# 
#-----[ bӦ椺M ]------------------------------------------ 
#
include

# 
#-----[ ӦN ]------------------------------------------ 
#
include_once

# 
#-----[ } ]------------------------------------------ 
# 
admin/admin_board.php

# 
#-----[ M ]------------------------------------------ 
#
$smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : "";

# 
#-----[ , [W ]------------------------------------------ 
#
// Admin Email notification on New Registration MOD
$notify_admin_new_reg_yes = ( $new['notify_admin_new_reg'] ) ? "checked=\"checked\"" : "";
$notify_admin_new_reg_no = ( !$new['notify_admin_new_reg'] ) ? "checked=\"checked\"" : "";

# 
#-----[ M ]------------------------------------------ 
#
	"SMTP_NO" => $smtp_no,

# 
#-----[ , [W ]------------------------------------------ 
#
	// Admin Email notification on New Registration MOD
	"L_ENABLE_NOTIFY_ADMIN_NEW_REG_TITLE" => $lang['Enable_notify_admin_new_reg_title'],
	"L_ENABLE_NOTIFY_ADMIN_NEW_REG" => $lang['Enable_notify_admin_new_reg'],
	"L_ENABLE_NOTIFY_ADMIN_NEW_REG_EXPLAIN" => $lang['Enable_notify_admin_new_reg_explain'],
	"L_ENABLE_NOTIFY_ADMIN_NEW_REG_USERID" => $lang['Enable_notify_admin_new_reg_userid'],
	"L_ENABLE_NOTIFY_ADMIN_NEW_REG_USERID_EXPLAIN" => $lang['Enable_notify_admin_new_reg_userid_explain'],
	"NOTIFY_ADMIN_NEW_REG_YES" => $notify_admin_new_reg_yes,
	"NOTIFY_ADMIN_NEW_REG_NO" => $notify_admin_new_reg_no,
	"NOTIFY_ADMIN_NEW_REG_USERID" => $new['notify_admin_new_reg_userid'],

# 
#-----[ } ]------------------------------------------ 
# 
templates/subSilver/admin/board_config_body.tpl

# 
#-----[ M ]------------------------------------------ 
#
	<tr>
		<th class="thHead" colspan="2">{L_COOKIE_SETTINGS}</th>
	</tr>

# 
#-----[ e, [W ]------------------------------------------ 
#
	<tr>
		<th class="thHead" colspan="2">{L_ENABLE_NOTIFY_ADMIN_NEW_REG_TITLE}</th>
	</tr>
	<tr>
		<td class="row1">{L_ENABLE_NOTIFY_ADMIN_NEW_REG}<br /><span class="gensmall">{L_ENABLE_NOTIFY_ADMIN_NEW_REG_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="notify_admin_new_reg" value="1" {NOTIFY_ADMIN_NEW_REG_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="notify_admin_new_reg" value="0" {NOTIFY_ADMIN_NEW_REG_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_ENABLE_NOTIFY_ADMIN_NEW_REG_USERID}<br /><span class="gensmall">{L_ENABLE_NOTIFY_ADMIN_NEW_REG_USERID_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" maxlength="255" name="Notify_admin_new_reg_userid" value="{NOTIFY_ADMIN_NEW_REG_USERID}" /></td>
	</tr>

# 
#-----[ xs/Ҧɮ ]------------------------------------------ 
# 
# ~ץ
